package org.kjtc.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.SelectProvider;
import org.kjtc.entity.ChargingStation;
import org.kjtc.entity.Equipment;

import java.util.List;
import java.util.Map;

/**
 * @ Author     ：Yellowong
 * @ Date       ：Created in 11:16 2018/12/10
 * @ Description：
 */
@Mapper
public interface EquipmentMapper {

    /* 查：查询与符合equipment条件的记录，返回对应的List */
    @SelectProvider(type = EquipmentProvider.class, method = "getEquipmentList")
    List<Equipment> getEquipmentList(Equipment equipment);

    /* 查：根据设备类型返回充电桩数量 */
    @SelectProvider(type = EquipmentProvider.class, method = "equipmentStatusStatistics")
    List<Map> equipmentStatusStatistics();

    /* 查：查询所有充电站名 */
    @SelectProvider(type = EquipmentProvider.class, method = "getChargingStationName")
    List<ChargingStation> getChargingStationName(ChargingStation chargingStation);
}
